<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php 

session_start(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>鬼泣3GUIDE</title>
<link href="../css/detail.css"  rel="stylesheet" />

</head>

<body>
<div id="mainwindow">
<div id="yamato">
<div id="logo">
<!--<img src="img/logo.jpg"  width="500" height="170"  style="position:absolute; top:-20px; left:-40px; border:#FFF solid thin"/>-->
DMC3 GUIDE</div>
<div id="login">
<?php
if(isset($_SESSION['loged'])&&$_SESSION['loged']){
	printf("<span id='personOp' style='color:#0c5150; cursor: pointer'>%s, </span>你好",$_SESSION['username']);
	//print($_SESSION['username']);
	}
else{
	print("请先<span id='logbtn'  style='color:#0c5150; cursor: pointer'>登录<span>");
	}
?>

</div>
</div>


<div id="content">
<div id="articleandinfo" >登陆后可编辑此处内容</div>
</div>
<div id="recommend">
<?php
if(isset($_SESSION['loged'])&&$_SESSION['loged']){
	echo "<input type='button' id='edit' value='edit' />";
}
?>

</div>
<!--<div id="bottom">@百度鬼泣3吧</div>-->
</div>

<!--隐藏块-->
<!--<div id="loginForm"  style="display:none"		>
<table>
<tr>
<td>username:</td>
<td><input type="text" size="12" /></td>
</tr>
<tr>
<td>password:</td>
<td><input type="text" size="12" /></td>
</tr>
</table></div>-->


<!--登陆div-->
<div id="attachArrow" style=" background-image:url(../img/attachArrow.png); width:25px; height:20px; position:absolute; z-index:99; display:none"></div>
<div id="loginform">
<form action="login.php"   method="post">
<label style="position:absolute; width:80%; height:25%; left:10%; top:7%;">名称:<input type="text" name="username" size="13"  id="loginusername" /></label>
<label style="position:absolute; width:80%; height:25%; left:10%; top:39%;">密码:<input type="password" name="password" size="13"  id="loginpassword" /></label>
<input type="text" name="backurl"  id="backurl" style=" display:none"  />
<input type="submit" id="loginbutton" style=" border:#0c5150 solid thin; width:30%; position:absolute; height:25%; left:35%; bottom:3%; background-color:#0c512e; color:#CCC " value="登陆"  title="暂不可用"/>
</form>
</div>
<!--个人操作-->
<div id="userop">
<ul>
<li id="logout">退出登陆
</li>
<li>
编辑记录
</li>

</ul>
</div>




<script type="text/javascript" src="../js/jq.js"></script>
<script type="text/javascript" src="../js/login.js"></script>
<script type="text/javascript">//logout
$("#logout").click(function(e) {
	//alert("dd")
    $.get("login.php", {action: "logout", backurl: url },
  function(){
    //alert("Data Loaded: " + data);
	window.location.reload(); 
  });
});
function edit(){
	$("#edit").click(function(e) {
		alert("dd")
        $("#articleandinfo").attr("contenteditable","true")
    });
	}
edit()
</script>

</body>
</html>
